package com.bsoft.rpc.basic.pack;

import com.alibaba.fastjson.JSON;
import com.bsoft.rpc.basic.transport.Message;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * 服务端处理类
 */
@Slf4j
public class NettyServerHandler extends SimpleChannelInboundHandler<String> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, String message) throws Exception {
        log.info("========>接收到客户端请求<========= ");
        log.info("消息内容：{}", message);
        log.info("消息长度：{}", message.length());
    }
}
